/**
 *    Copyright (c) [2021] [白晓明]
 *    [IMHarmonyOSLib] is licensed under Mulan PSL v2.
 *    You can use this software according to the terms and conditions of the Mulan PSL v2.
 *    You may obtain a copy of Mulan PSL v2 at:
 *             http://license.coscl.org.cn/MulanPSL2
 *    THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 *    See the Mulan PSL v2 for more details.
 */
package com.itming.ui.sample.slice;

import com.itming.ui.coptlib.core.IMIcon;
import com.itming.ui.sample.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.window.service.WindowManager;

public class UiLibLoginSlice extends AbilitySlice {
    @Override
    public void onStart(Intent intent) {
        getWindow().addFlags(WindowManager.LayoutConfig.MARK_FULL_SCREEN);
        getWindow().addFlags(WindowManager.LayoutConfig.MARK_TRANSLUCENT_STATUS);
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_ui_lib_login);

        IMIcon imIcon = (IMIcon) findComponentById(ResourceTable.Id_close);
        imIcon.setClickedListener(l -> {
            onBackPressed();
        });
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
